create or replace package cust_hsd_admission as
   --Return a student's grade level on a given day. Uses registrations(_archive). Returns null for dates preceding
   --the student's first-ever registration.
   function grade_on_day(p_pupil_number number, p_date date) return varchar2;
   --Return a student's home school.school on a given day; If withdrawn on the day, return last homeschool. 
   function home_sch_on_day(p_pupil_number number, p_date date) return number;
   --Student was registered (event) at a school at any time between two dates.
   function reg_in_period(p_pupil_number number, p_school number, p_start_date date, p_end_date date) return varchar2;
   --Student was registered (status) on a given day
   function reg_on_day(p_pupil_number number, p_school number, p_date date) return varchar2;
end;
/
